package fristphase.day03;

import java.util.Arrays;

public class MySort {
    public static void main(String[] args) {
        int[] array = new int[10];
        for (int i = 0; i < array.length; i++) {
            int myRandom = (int)(Math.random()*100);
            array[i] = myRandom;
        }
        Arrays.sort(array);
        System.out.println("升序：");
        //升序
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
        System.out.println();
        System.out.println("降序：");
        //降序
        for (int i = array.length-1; i >= 0; i--) {
            System.out.print(array[i]+" ");
        }
    }
}
